/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmMaterialneedArr extends BasicModel<PmMaterialneedArr> {
  djno?: string; // 单据号
  projectno?: string; // 工程编号
  name?: string; // 工程名称
  fdno?: string; // 分单编号
  sno?: string; // 设计变更单号
  arrDate?: string; // 收货日期
  needId?: string; // 计划ID
  pmMaterialneedArrsList?: any[]; // 子表列表
}

export const pmMaterialneedArrList = (params?: PmMaterialneedArr | any) =>
  defHttp.get<PmMaterialneedArr>({ url: adminPath + '/material/receive/pmMaterialneedArr/list', params });

export const pmMaterialneedArrListData = (params?: PmMaterialneedArr | any) =>
  defHttp.post<Page<PmMaterialneedArr>>({ url: adminPath + '/material/receive/pmMaterialneedArr/listData', params });

export const pmMaterialneedArrForm = (params?: PmMaterialneedArr | any) =>
  defHttp.get<PmMaterialneedArr>({ url: adminPath + '/material/receive/pmMaterialneedArr/form', params });

export const pmMaterialneedArrSave = (params?: any, data?: PmMaterialneedArr | any) =>
  defHttp.postJson<PmMaterialneedArr>({ url: adminPath + '/material/receive/pmMaterialneedArr/save', params, data });

export const pmMaterialneedArrDelete = (params?: PmMaterialneedArr | any) =>
  defHttp.get<PmMaterialneedArr>({ url: adminPath + '/material/receive/pmMaterialneedArr/delete', params });
